package one.stand.service;

import one.stand.model.ResultModel;

import java.util.Map;

/**
 * @author: QIK
 * @CreateDate: 2019/4/29 11:31
 */
public interface WxPayService {

    Map<String, String> payCallback(String notifyData) throws Exception;
    /**
     * 微信统一下单支付
     *
     * @param body
     * @param orderNum
     * @param totalFee
     * @param openId
     * @return
     * @throws Exception
     */
    Map<String, String> wxPay(String body, String orderNum, String totalFee, String openId, String ip,Integer orderId,String companyKey) throws Exception;
    /**
     * 退款
     *
     * @param tradeNo     微信生成的订单号，在支付通知中有返回
     * @param outRefundNo 商户系统内部的退款单号，商户系统内部唯一
     * @param totalFee    订单总金额
     * @param refundFee   退款金额
     * @param refundDesc  退款原因
     * @return
     * @throws Exception
     */
    ResultModel refund(String tradeNo, String outRefundNo, String totalFee, String refundFee, String refundDesc,Integer orderId) throws Exception;

    ResultModel doCash(String recordNo, String openid, Integer amount, String ip, String companyKey) throws Exception;

    String success();

    String fail();
}
